home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_RecordAndEval Tcl Command Language Library Tcl_RecordAndEval
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Tcl_RecordAndEval - save a Tcl command in the history list,
- then execute it
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ttccll..hh>>
-
- int
- TTccll__RReeccoorrddAAnnddEEvvaall(_i_n_t_e_r_p, _c_m_d, _f_l_a_g_s)
-
- AARRGGUUMMEENNTTSS
- Tcl_Interp *_i_n_t_e_r_p (in) Interpreter in which to
- record and execute the
- command.
-
- char *_c_m_d (in) Command (or sequence of
- commands) to execute.
-
- char _f_l_a_g_s (in) Flags to pass to TTccll__EEvvaall
- (normally 0). If -1, then
- the command is not exe-
- cuted; it's just
- recorded.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- TTccll__RReeccoorrddAAnnddEEvvaall is invoked to record a command on the his-
- tory list and then execute it. Programs that do not wish to
- use the history mechanism should not call TTccll__RReeccoorrddAAnnddEEvvaall;
- they should call TTccll__EEvvaall instead. Furthermore,
- TTccll__RReeccoorrddAAnnddEEvvaall should only be called with top-level com-
- mands typed by the user, since the purpose of history is to
- allow the user to re-issue recently-invoked commands.
-
- This procedure does three things. First, it initializes
- history for the interpreter _i_n_t_e_r_p, if this is the first
- call for _i_n_t_e_r_p. Among other things, this makes the hhiissttoorryy
- command available in _i_n_t_e_r_p. If TTccll__RReeccoorrddAAnnddEEvvaall isn't
- called for an interpreter then there will be no hhiissttoorryy com-
- mand in that interpreter. Second, TTccll__RReeccoorrddAAnnddEEvvaall saves
- _c_o_m_m_a_n_d in the history list for iinntteerrpp, making a new event
- to hold the command. Third, TTccll__RReeccoorrddAAnnddEEvvaall executes the
- command by passing it and _f_l_a_g_s to TTccll__EEvvaall. If _f_l_a_g_s is -1
- then only the first two steps are taken; the command will
- not be executed.
-
-
- KKEEYYWWOORRDDSS
- command, event, execute, history, interpreter, record
-
-
-
-
- Sprite v.1.0 Printed: October 9, 1991 1
-
-
-
-